#include<iostream>
#include<algorithm>
using namespace std;

int score[35];
int b[7];
int main(){
	int n;
	scanf("%d",&n);
	for(int i=0;i<n;i++){
		scanf("%d",&score[i]);
	}
	sort(score,score+n,greater<int>());
	for(int i=0;i<n;i++){
		printf("%d\n",score[i]);
	}
	
	for(int i=0;i<n;i++){
		if(score[i] == 100){
			b[1]++;
		}else if(score[i]>=90){
			b[2]++;
		}else if(score[i]>=80){
			b[3]++;
		}else if(score[i]>=70){
			b[4]++;
		}else if(score[i]>=60){
			b[5]++;
		}else{
			b[6]++;
		}
	}
	for(int i=1;i<=6;i++){
		if(i!=6){
			printf("%d ",b[i]);
		}else{
			printf("%d\n",b[i]);
		}
	}
	return 0;
}

